package com.bgs.travelapp.card.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;

/**
 * gpd 2022-08-07 20点53分
 * 前端展示---用户购买会员卡记录
 * 实体类
 */
@Table(name="buy_card_record")
@Data
public class CardRecordEntity {
    //会员卡记录id
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    //会员卡名称
    private String cardName;

    //购买会员卡月份数
    private Integer purchaseMonth;

    //会员卡id（关联card表id）
    private Integer cardId;

    //用户名称
    private String userName;

    //用户id（关联user表id）
    private Integer userId;

    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    //会员卡过期时间
    private Date expirationTime;

    //判断是否过期 0正常1过期
    private Integer expiredId;

    //开通会员卡价钱
    private Integer cardPrice;

    //用户账号
    private String loginName;

    //会员卡类型实体类
    private CardEntity cardEntity;
}
